What is jsii-pacmak?
The jsii-pacmak npm package is a tool used to package and publish multi-language libraries from a single TypeScript codebase. It leverages the jsii framework to generate bindings for multiple programming languages, allowing developers to write their code once and use it across different ecosystems.
What are jsii-pacmak's main functionalities?
Packaging Libraries
This feature allows you to package your TypeScript library into multiple language-specific packages. The code sample demonstrates how to use the jsii-pacmak package to package a library and handle the completion or failure of the process.
const { Pacmak } = require('jsii-pacmak');
const pacmak = new Pacmak();
pacmak.package().then(() => console.log('Packaging complete!')).catch(err => console.error('Packaging failed:', err));
Publishing Packages
This feature enables you to publish the generated packages to their respective package managers. The code sample shows how to use jsii-pacmak to publish the packages and handle the completion or failure of the process.
const { Pacmak } = require('jsii-pacmak');
const pacmak = new Pacmak();
pacmak.publish().then(() => console.log('Publishing complete!')).catch(err => console.error('Publishing failed:', err));
Customizing Package Generation
This feature allows you to customize the package generation process by specifying the target languages. The code sample demonstrates how to generate packages only for Python and Java using jsii-pacmak.
const { Pacmak } = require('jsii-pacmak');
const pacmak = new Pacmak({ targets: ['python', 'java'] });
pacmak.package().then(() => console.log('Custom packaging complete!')).catch(err => console.error('Custom packaging failed:', err));
Other packages similar to jsii-pacmak
lerna
Lerna is a tool for managing JavaScript projects with multiple packages. It optimizes the workflow around managing multi-package repositories with git and npm. Unlike jsii-pacmak, which focuses on generating multi-language bindings, Lerna is more about managing and versioning multiple JavaScript packages within a monorepo.
nx
Nx is a set of extensible dev tools for monorepos, which helps you develop like Google, Facebook, and Microsoft. It provides a powerful CLI and a set of plugins to manage and build multiple projects. While jsii-pacmak is focused on packaging and publishing multi-language libraries, Nx is more about managing and building multiple projects within a monorepo.
rush
Rush is a scalable monorepo manager for the web, which helps you manage large repositories with many projects and dependencies. It provides a robust set of tools for managing dependencies, building projects, and publishing packages. Unlike jsii-pacmak, which is designed for generating multi-language bindings, Rush is focused on managing and building large monorepos.
jsii-pacmak
Generates ready-to-publish language-specific packages for jsii modules, part of
the jsii project.
Usage
In general, running jsii-pacmak
from a well-configured jsii module would generate and
build a ready-to-publish package in each of the target languages defined in package.json
.
- See Getting Started for more details.
- Run
jsii-pacmak --help
for full usage.
Contributing
See CONTRIBUTING
for details.
License
jsii is distributed under the
Apache License, Version 2.0.
See LICENSE and NOTICE for more information.